package com.myway.pojo;

import lombok.ToString;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@ToString
public class FlySegment implements Serializable,Comparable<FlySegment> {
    private Long id;

    private Long orderId;

    private String depCode;

    private String arrCode;

    private Long fltId;

    private String cabinClass;

    private String flightNo;

    private Date depTime;

    private Date arrTime;

    private String planeType;

    private String groupNo;

    private String inventory;

    private String distance;

    private String meals;

    private String baggage;

    private BigDecimal baseFare=new BigDecimal(0);

    public FlySegment(Long id, Long orderId, String depCode, String arrCode, Long fltId, String cabinClass, String flightNo, Date depTime, Date arrTime, String planeType, String groupNo, String inventory,BigDecimal baseFare,String distance, String meals, String baggage) {
        this.id = id;
        this.orderId = orderId;
        this.depCode = depCode;
        this.arrCode = arrCode;
        this.fltId = fltId;
        this.cabinClass = cabinClass;
        this.flightNo = flightNo;
        this.depTime = depTime;
        this.arrTime = arrTime;
        this.planeType = planeType;
        this.groupNo = groupNo;
        this.inventory = inventory;
        this.distance = distance;
        this.meals = meals;
        this.baggage = baggage;
        this.baseFare = baseFare;
    }

    public FlySegment() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getDepCode() {
        return depCode;
    }

    public void setDepCode(String depCode) {
        this.depCode = depCode == null ? null : depCode.trim();
    }

    public String getArrCode() {
        return arrCode;
    }

    public void setArrCode(String arrCode) {
        this.arrCode = arrCode == null ? null : arrCode.trim();
    }

    public Long getFltId() {
        return fltId;
    }

    public void setFltId(Long fltId) {
        this.fltId = fltId;
    }

    public String getCabinClass() {
        return cabinClass;
    }

    public void setCabinClass(String cabinClass) {
        this.cabinClass = cabinClass == null ? null : cabinClass.trim();
    }

    public String getFlightNo() {
        return flightNo;
    }

    public void setFlightNo(String flightNo) {
        this.flightNo = flightNo == null ? null : flightNo.trim();
    }

    public Date getDepTime() {
        return depTime;
    }

    public void setDepTime(Date depTime) {
        this.depTime = depTime;
    }

    public Date getArrTime() {
        return arrTime;
    }

    public void setArrTime(Date arrTime) {
        this.arrTime = arrTime;
    }

    public String getPlaneType() {
        return planeType;
    }

    public void setPlaneType(String planeType) {
        this.planeType = planeType == null ? null : planeType.trim();
    }

    public String getGroupNo() {
        return groupNo;
    }

    public void setGroupNo(String groupNo) {
        this.groupNo = groupNo == null ? null : groupNo.trim();
    }

    public String getInventory() {
        return inventory;
    }

    public void setInventory(String inventory) {
        this.inventory = inventory == null ? null : inventory.trim();
    }

    public BigDecimal getBaseFare() {
        return baseFare;
    }

    public void setBaseFare(BigDecimal baseFare) {
        this.baseFare = baseFare;
    }

    public String getDistance() {
        return distance;
    }

    public void setDistance(String distance) {
        this.distance = distance;
    }

    public String getMeals() {
        return meals;
    }

    public void setMeals(String meals) {
        this.meals = meals;
    }

    public String getBaggage() {
        return baggage;
    }

    public void setBaggage(String baggage) {
        this.baggage = baggage;
    }

    public int compareTo(FlySegment o) {
        return this.getDepTime().compareTo(o.getDepTime());
    }
}